package BookList;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-25
 * Time:9:35
 */
public class Booklist {
    Book[] books=new Book[10];
    public int size;
    public Booklist()
    {
        books[0]=new Book("西游记","灰太狼",22,"小说");
        books[1]=new Book("三国演义","小太狼",20,"小说");
        books[2]=new Book("孙子兵法","大灰狼",25,"小说");
        books[3]=new Book("红楼梦","红太狼",28,"小说");
        this.size=4;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }
    public Book getBook(int pos) {
        return books[pos];
    }
    public void setBook(int pos,Book book) {
        books[pos] = book;
    }
}
